<?php
namespace app\index\controller;

use think\Controller;
use think\Db;
use think\Request;
use think\Session;

// 导航栏(会有登录注册,需继承其他页面会报未定义变量)
class Public extends Controller
{
    public function _initialize()
    {
    	$session = Session::get();
    	
        // 一级分类
        $category = DB::table('category')->select();


        return view('index@index/index',['session' => $session,'category' => $category]);
    }    

}
